<h1>Milestones</h1>
<%= link_to '<', { :page => @milestone_pages.current.previous } if @milestone_pages.current.previous %>
<%= link_to '>', { :page => @milestone_pages.current.next } if @milestone_pages.current.next %> 
<table>
<tr>
<% for milestone in @milestones %>
	<td>
	<h2><%= milestone.name %></h2>
	<div><%= milestone.description %></div>
	<div class="milestones_progressContainer">
		<div class="milestones_progressLine"
			style='width:<%= complete_percentage(milestone.id) %>%'>
			<%= complete_percentage(milestone.id)%>%</div>
	</div>
	<% i = 1
	style = ""
	for task in milestone.tasks 
		style = "milestones_status" + @status[task.status.to_i]
	%>
	<div class='<%= style %>'><%=i%>) <%= task.description %> (owned by <%= task.owner.fullname %>)
	<%= link_to "[view]",
           { :controller => "tasks", :action => "show", :id => task.id }
	%>
	</div>	
<%	
	i+=1
	end 
%> </td>
<% 
	end
%>
</tr>
</table>